## Examples of conjugates

from PyM import *

# Conjugates of an element x in L over subfield K
def conjugates(x,K=''):
    if K == '':
        K = prime_field(K_(x))
    q = cardinal(K)
    X = [x]
    y = x**q
    while y != x:
        X += [y]
        y = y**q
    return X

k = Zn(2)
[K,x] = extension(k,[1,1,1],'x')
[F,y] = extension(K,[1,x,1],'y')

Cx = conjugates(x)
Cxk = conjugates(x,k)
CxK = conjugates(x,K)

Cy = conjugates(y)
Cyk = conjugates(y,k) 
CyK = conjugates(y,K) 

show(Cx)
show(Cxk)
show(CxK)
show(Cy)
show(Cyk)
show(CyK)
